package com.example.nettyudp.server;

import io.netty.channel.ChannelHandlerContext;

import java.util.HashMap;
import java.util.Map;

/**
 * @author FDJ,
 * @date 2020/5/27,
 * @time 14:18
 */
public class NettyBean {
    //保存连接上下文
    private Map<String, ChannelHandlerContext> channel = new HashMap<>(16);

    //保存全局gps信息
    private Map<String, Object> gpsMap = new HashMap<String, Object>(16);


    public Map<String, Object> getGpsMap() {
        return gpsMap;
    }

    public void setGpsMap(String key, Object val) {
        this.gpsMap.put(key, val);
    }

    public Map<String, ChannelHandlerContext> getChannel() {
        return channel;
    }

    public void setChannel(String key, ChannelHandlerContext val) {
        this.channel.put(key, val);
    }
}
